In [1]:
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import matplotlib.pyplot as plt
import plotly.express as px
import plotly.graph_objects as go
import plotly.io as pio
pio.renderers.default='notebook'
from IPython.display import display, HTML
display(HTML("<style>.container { width:100% !important; }</style>"))
In [2]:
netflix_overall = pd.read_csv("netflix_titles.csv")
netflix_overall.head()
Out[2]:
| show_id | type | title | director | cast | country | date_added | release_year | rating | duration | listed_in | description | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | s1 | TV Show | 3% | NaN | João Miguel, Bianca Comparato, Michel Gomes, R... | Brazil | August 14, 2020 | 2020 | TV-MA | 4 Seasons | International TV Shows, TV Dramas, TV Sci-Fi &... | In a future where the elite inhabit an island ... |
| 1 | s2 | Movie | 7:19 | Jorge Michel Grau | Demián Bichir, Héctor Bonilla, Oscar Serrano, ... | Mexico | December 23, 2016 | 2016 | TV-MA | 93 min | Dramas, International Movies | After a devastating earthquake hits Mexico Cit... |
| 2 | s3 | Movie | 23:59 | Gilbert Chan | Tedd Chan, Stella Chung, Henley Hii, Lawrence ... | Singapore | December 20, 2018 | 2011 | R | 78 min | Horror Movies, International Movies | When an army recruit is found dead, his fellow... |
| 3 | s4 | Movie | 9 | Shane Acker | Elijah Wood, John C. Reilly, Jennifer Connelly... | United States | November 16, 2017 | 2009 | PG-13 | 80 min | Action & Adventure, Independent Movies, Sci-Fi... | In a postapocalyptic world, rag-doll robots hi... |
| 4 | s5 | Movie | 21 | Robert Luketic | Jim Sturgess, Kevin Spacey, Kate Bosworth, Aar... | United States | January 1, 2020 | 2008 | PG-13 | 123 min | Dramas | A brilliant group of students become card-coun... |
TV Show vs Movie¶
In [3]:
netflix_shows=netflix_overall[netflix_overall['type']=='TV Show']
netflix_movies=netflix_overall[netflix_overall['type']=='Movie']
sns.set(style="darkgrid")
ax = sns.countplot(x="type", data=netflix_overall, hue='type', palette="Set2")
In [4]:
netflix_date = netflix_shows[['date_added']].dropna()
netflix_date['year'] = netflix_date['date_added'].apply(lambda x : x.split(', ')[-1])
netflix_date['month'] = netflix_date['date_added'].apply(lambda x : x.lstrip().split(' ')[0])
month_order = ['January', 'February', 'March', 'April', 'May', 'June',
'July', 'August', 'September', 'October', 'November', 'December'][::-1]
monthly_content = netflix_date.groupby('year')['month'].value_counts().unstack().fillna(0)[month_order].T
monthly_content
Out[4]:
| year | 2008 | 2013 | 2014 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 |
|---|---|---|---|---|---|---|---|---|---|---|
| month | ||||||||||
| December | 0.0 | 0.0 | 1.0 | 7.0 | 44.0 | 39.0 | 64.0 | 50.0 | 74.0 | 0.0 |
| November | 0.0 | 0.0 | 3.0 | 2.0 | 18.0 | 31.0 | 41.0 | 77.0 | 55.0 | 0.0 |
| October | 0.0 | 2.0 | 0.0 | 5.0 | 18.0 | 32.0 | 46.0 | 73.0 | 56.0 | 0.0 |
| September | 0.0 | 1.0 | 0.0 | 1.0 | 19.0 | 33.0 | 44.0 | 44.0 | 62.0 | 0.0 |
| August | 0.0 | 1.0 | 0.0 | 0.0 | 17.0 | 38.0 | 34.0 | 53.0 | 61.0 | 0.0 |
| July | 0.0 | 0.0 | 0.0 | 3.0 | 10.0 | 34.0 | 30.0 | 67.0 | 53.0 | 0.0 |
| June | 0.0 | 0.0 | 0.0 | 3.0 | 8.0 | 30.0 | 28.0 | 48.0 | 48.0 | 0.0 |
| May | 0.0 | 0.0 | 0.0 | 2.0 | 4.0 | 25.0 | 28.0 | 49.0 | 64.0 | 0.0 |
| April | 0.0 | 0.0 | 1.0 | 4.0 | 8.0 | 29.0 | 31.0 | 50.0 | 58.0 | 0.0 |
| March | 0.0 | 1.0 | 0.0 | 2.0 | 3.0 | 38.0 | 38.0 | 60.0 | 56.0 | 0.0 |
| February | 1.0 | 0.0 | 1.0 | 1.0 | 7.0 | 18.0 | 24.0 | 46.0 | 46.0 | 0.0 |
| January | 0.0 | 0.0 | 0.0 | 0.0 | 29.0 | 14.0 | 22.0 | 39.0 | 64.0 | 29.0 |
In [5]:
monthly_content.to_numpy()
Out[5]:
array([[ 0., 0., 1., 7., 44., 39., 64., 50., 74., 0.],
[ 0., 0., 3., 2., 18., 31., 41., 77., 55., 0.],
[ 0., 2., 0., 5., 18., 32., 46., 73., 56., 0.],
[ 0., 1., 0., 1., 19., 33., 44., 44., 62., 0.],
[ 0., 1., 0., 0., 17., 38., 34., 53., 61., 0.],
[ 0., 0., 0., 3., 10., 34., 30., 67., 53., 0.],
[ 0., 0., 0., 3., 8., 30., 28., 48., 48., 0.],
[ 0., 0., 0., 2., 4., 25., 28., 49., 64., 0.],
[ 0., 0., 1., 4., 8., 29., 31., 50., 58., 0.],
[ 0., 1., 0., 2., 3., 38., 38., 60., 56., 0.],
[ 1., 0., 1., 1., 7., 18., 24., 46., 46., 0.],
[ 0., 0., 0., 0., 29., 14., 22., 39., 64., 29.]])
In [6]:
monthly_content.shape
Out[6]:
(12, 10)
In [7]:
range(monthly_content.shape[1])
Out[7]:
range(0, 10)
In [8]:
plt.figure(figsize=(10, 7), dpi=200)
plt.pcolor(monthly_content, cmap='afmhot_r', edgecolors='white', linewidths=2) # heatmap
plt.xticks(np.arange(0.5, len(monthly_content.columns), 1), monthly_content.columns, fontsize=7, fontfamily='serif')
plt.yticks(np.arange(0.5, len(monthly_content.index), 1), monthly_content.index, fontsize=7, fontfamily='serif')
plt.title('Netflix Contents Update', fontsize=12, fontweight='bold', position=(0.20, 1.0+0.02))
cbar = plt.colorbar()
cbar.ax.tick_params(labelsize=8)
cbar.ax.minorticks_on()
plt.show()
Text properties and layout¶
https://matplotlib.org/stable/users/explain/text/text_props.html
In [9]:
month_order = ['January', 'February', 'March', 'April', 'May', 'June',
'July', 'August', 'September', 'October', 'November', 'December']
monthly_content = netflix_date.groupby('year')['month'].value_counts().unstack().fillna(0)[month_order].T
monthly_content
fig, ax = plt.subplots(figsize=(10, 7), dpi=200)
im = ax.imshow(monthly_content, cmap='afmhot_r')
# Loop over data dimensions and create text annotations.
for i in range(monthly_content.shape[0]): # loop columns
for j in range(monthly_content.shape[1]): # loop rows
text = ax.text(j, i, monthly_content.to_numpy()[i, j],
ha="center", va="center", color="grey")
plt.xticks(np.arange(0.5, len(monthly_content.columns), 1), monthly_content.columns, fontsize=3, fontfamily='serif', ha="right", rotation=315)
plt.yticks(np.arange(0.5, len(monthly_content.index), 1), monthly_content.index, fontsize=3, fontfamily='serif', va='bottom', rotation=315)
plt.title('Netflix Contents Update', fontsize=12, fontweight='bold', position=(0.20, 1.0+0.02))
ax.tick_params(labelsize=8)
#cbar.ax.minorticks_on()
fig.colorbar(im, ax=ax, label='Monthly Update')
plt.show()
TV Rating (Parental Guideline)¶
In [10]:
netflix_movies['rating'].unique()
Out[10]:
array(['TV-MA', 'R', 'PG-13', 'TV-14', 'TV-PG', 'NR', 'TV-G', 'TV-Y', nan,
'PG', 'G', 'TV-Y7', 'NC-17', 'TV-Y7-FV', 'UR'], dtype=object)
In [11]:
plt.figure(figsize=(12,10))
sns.set(style="darkgrid")
ax = sns.countplot(x="rating", data=netflix_movies, palette="Set2", hue='rating',
order=netflix_movies['rating'].value_counts().index[0:15])
IMDb rating and movie DF¶
In [12]:
imdb_ratings = pd.read_csv('IMDb_ratings.csv',usecols=['weighted_average_vote'])
imdb_titles = pd.read_csv('IMDb_movies.csv', usecols=['title','year','genre'],low_memory=False)
ratings = pd.DataFrame({'Title':imdb_titles.title,
'Release Year':imdb_titles.year,
'Rating': imdb_ratings.weighted_average_vote,
'Genre':imdb_titles.genre})
ratings.drop_duplicates(subset=['Title','Release Year','Rating'], inplace=True)
ratings.shape
Out[12]:
(85852, 4)
In [13]:
ratings.dropna()
joint_data = ratings.merge(netflix_overall,left_on='Title',right_on='title',how='inner')
joint_data = joint_data.sort_values(by='Rating', ascending=False)
In [14]:
joint_data.sample(3)
Out[14]:
| Title | Release Year | Rating | Genre | show_id | type | title | director | cast | country | date_added | release_year | rating | duration | listed_in | description | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1451 | Benji | 2018 | 6.3 | Crime, Drama, Family | s835 | Movie | Benji | Brandon Camp | Gabriel Bateman, Darby Camp, Kiele Sanchez, Je... | United Arab Emirates, United States | March 16, 2018 | 2018 | TV-PG | 87 min | Children & Family Movies, Dramas | A determined dog comes to the rescue and helps... |
| 2226 | Pachamama | 2018 | 6.7 | Animation, Adventure, Family | s4731 | Movie | Pachamama | Juan Antin | Adam Moussamih, Charli Birdgenau, Vlastra Vran... | France, Luxembourg, Canada | June 7, 2019 | 2019 | PG | 71 min | Children & Family Movies | When a sacred statue is taken from his Andean ... |
| 1572 | Aiyyaa | 2012 | 4.4 | Comedy, Romance | s357 | Movie | Aiyyaa | Sachin Kundalkar | Rani Mukerji, Prithviraj Sukumaran, Nirmiti Sa... | India | July 5, 2020 | 2012 | TV-14 | 151 min | Comedies, International Movies, Music & Musicals | An outspoken, imaginative girl from a conserva... |
Top rated 10 movies on Netflix¶
In [15]:
top_rated=joint_data[0:10]
fig =px.sunburst( top_rated, path=['title','country'],
values='Rating', color='Rating')
fig.show()
Countries with highest rated content.¶
In [16]:
country_count=joint_data['country'].value_counts().sort_values(ascending=False)
country_count=pd.DataFrame(country_count)
topcountries=country_count[0:11]
topcountries
Out[16]:
| count | |
|---|---|
| country | |
| United States | 799 |
| India | 701 |
| United Kingdom | 107 |
| Canada | 56 |
| Philippines | 50 |
| Spain | 40 |
| South Korea | 36 |
| Indonesia | 35 |
| France | 33 |
| United Kingdom, United States | 31 |
| Australia | 30 |
In [17]:
# Hong Kong people don't know IMDb much
country_count.loc[country_count.index=='Hong Kong']
Out[17]:
| count | |
|---|---|
| country | |
| Hong Kong | 8 |
Movies released per year¶
In [18]:
plt.figure(figsize=(12,10))
sns.set(style="darkgrid")
ax = sns.countplot(y="release_year", data=netflix_movies, #palette="Set2", hue='release_year',
order=netflix_movies['release_year'].value_counts().index[0:15])
Film production countries¶
In [19]:
# some movie was filmed and produced in a few countries
netflix_movies['country'].sample(5)
Out[19]:
231 United States 1675 United States 7621 Germany, United States 2826 Germany, United States 3249 Germany, United States, Canada Name: country, dtype: object
In [20]:
countries={}
netflix_movies.loc[netflix_movies.index, ['country']] = netflix_movies['country'].fillna('Unknown')
cou=list(netflix_movies['country'])
for i in cou:
i=list(i.split(','))
if len(i)==1:
if i in list(countries.keys()):
countries[i]+=1
else:
countries[i[0]]=1
else:
for j in i:
if j in list(countries.keys()):
countries[j]+=1
else:
countries[j]=1
In [21]:
countries
Out[21]:
{'Mexico': 1,
'Singapore': 3,
'United States': 1,
'Egypt': 1,
'India': 1,
'Thailand': 1,
'Nigeria': 1,
'Norway': 2,
' Iceland': 4,
' United States': 331,
'United Kingdom': 2,
'South Korea': 1,
'Italy': 1,
'Canada': 3,
'Indonesia': 1,
'Romania': 3,
'Spain': 1,
'Turkey': 1,
'Iceland': 1,
'South Africa': 1,
' Nigeria': 5,
'France': 4,
' South Africa': 14,
'Portugal': 2,
' Spain': 39,
'Unknown': 1,
'Hong Kong': 1,
' China': 54,
' Singapore': 8,
' Germany': 89,
'Argentina': 2,
' France': 128,
' Serbia': 4,
'Germany': 3,
'Denmark': 2,
' Poland': 9,
'Poland': 1,
'Japan': 2,
'Kenya': 2,
'New Zealand': 2,
' United Kingdom': 126,
'Pakistan': 1,
'Australia': 1,
'China': 1,
' Hong Kong': 23,
'Taiwan': 1,
' South Korea': 13,
' Japan': 28,
' Canada': 111,
'Netherlands': 1,
' Denmark': 12,
' Netherlands': 17,
'Philippines': 1,
'United Arab Emirates': 2,
'Brazil': 1,
'Iran': 1,
' Belgium': 68,
' Brazil': 7,
'Israel': 1,
' Mexico': 22,
'Uruguay': 2,
' Argentina': 14,
'Bulgaria': 1,
' Chile': 4,
' Bulgaria': 4,
'Colombia': 1,
' Algeria': 2,
' Egypt': 4,
'Soviet Union': 1,
' India': 32,
'Sweden': 2,
'Malaysia': 1,
'Ireland': 1,
' Italy': 25,
' Luxembourg': 10,
'Serbia': 3,
' Sweden': 20,
' Colombia': 4,
' Austria': 3,
'Peru': 2,
' Senegal': 2,
'Chile': 4,
' Switzerland': 10,
'Ghana': 1,
' United Arab Emirates': 15,
'Saudi Arabia': 3,
' Armenia': 1,
' Jordan': 7,
' Mongolia': 1,
' New Zealand': 7,
' Philippines': 3,
' Uruguay': 5,
'Namibia': 1,
' Finland': 4,
' Australia': 28,
' Ireland': 8,
'Lebanon': 2,
'Belgium': 1,
' Indonesia': 3,
' Iran': 3,
' Qatar': 7,
'Vietnam': 1,
'Russia': 3,
' Russia': 5,
' Israel': 6,
' Malta': 2,
'Kuwait': 1,
' Pakistan': 2,
' Czech Republic': 10,
' Bahamas': 1,
' Sri Lanka': 1,
' Cayman Islands': 2,
' Bangladesh': 1,
'': 4,
'Czech Republic': 4,
'Zimbabwe': 1,
'Hungary': 1,
' Thailand': 4,
' Zimbabwe': 2,
'Finland': 3,
' Norway': 9,
' Latvia': 1,
' Liechtenstein': 1,
'Venezuela': 2,
' Peru': 4,
' Morocco': 6,
' Cambodia': 3,
'Cambodia': 1,
' Albania': 1,
' Nicaragua': 1,
' Lebanon': 5,
' Greece': 7,
' Turkey': 2,
' Croatia': 2,
' Guatemala': 1,
'West Germany': 1,
'Slovenia': 1,
'Switzerland': 2,
' Dominican Republic': 1,
' Portugal': 2,
'Austria': 1,
'Bangladesh': 1,
' Nepal': 2,
' Taiwan': 3,
' Samoa': 1,
' West Germany': 2,
' Bermuda': 1,
' Ecuador': 1,
'Georgia': 1,
' Botswana': 1,
' Iraq': 2,
' Hungary': 4,
' Kenya': 2,
' Vatican City': 1,
' Malaysia': 2,
' Angola': 1,
'Guatemala': 1,
' Soviet Union': 2,
'Jamaica': 1,
' Kazakhstan': 1,
' Malawi': 1,
' Romania': 2,
'Greece': 1,
' Slovakia': 1,
' Lithuania': 1,
' Afghanistan': 1,
'Paraguay': 1,
'Somalia': 1,
' Sudan': 1,
' Panama': 1,
' Slovenia': 2,
' Venezuela': 1,
' Namibia': 1,
' Uganda': 1,
' East Germany': 1,
' Ukraine': 1,
'Croatia': 1,
' Montenegro': 1}
In [22]:
countries_fin = {}
for country,no in countries.items():
country=country.replace(' ','')
if country in list(countries_fin.keys()):
countries_fin[country]+=no
else:
countries_fin[country]=no
countries_fin={k: v for k, v in sorted(countries_fin.items(), key=lambda item: item[1], reverse= True)}
In [23]:
countries_fin
Out[23]:
{'UnitedStates': 332,
'France': 132,
'UnitedKingdom': 128,
'Canada': 114,
'Germany': 92,
'Belgium': 69,
'China': 55,
'Spain': 40,
'India': 33,
'Japan': 30,
'Australia': 29,
'Italy': 26,
'HongKong': 24,
'Mexico': 23,
'Sweden': 22,
'Netherlands': 18,
'UnitedArabEmirates': 17,
'Argentina': 16,
'SouthAfrica': 15,
'SouthKorea': 14,
'Denmark': 14,
'CzechRepublic': 14,
'Switzerland': 12,
'Singapore': 11,
'Norway': 11,
'Poland': 10,
'Luxembourg': 10,
'NewZealand': 9,
'Ireland': 9,
'Brazil': 8,
'Chile': 8,
'Russia': 8,
'Greece': 8,
'Serbia': 7,
'Israel': 7,
'Uruguay': 7,
'Jordan': 7,
'Finland': 7,
'Lebanon': 7,
'Qatar': 7,
'Nigeria': 6,
'Peru': 6,
'Morocco': 6,
'Egypt': 5,
'Thailand': 5,
'Iceland': 5,
'Romania': 5,
'Bulgaria': 5,
'Colombia': 5,
'Hungary': 5,
'Indonesia': 4,
'Portugal': 4,
'Kenya': 4,
'Taiwan': 4,
'Philippines': 4,
'Iran': 4,
'Austria': 4,
'': 4,
'Cambodia': 4,
'Turkey': 3,
'Pakistan': 3,
'SovietUnion': 3,
'Malaysia': 3,
'SaudiArabia': 3,
'Zimbabwe': 3,
'Venezuela': 3,
'Croatia': 3,
'WestGermany': 3,
'Slovenia': 3,
'Algeria': 2,
'Senegal': 2,
'Namibia': 2,
'Malta': 2,
'CaymanIslands': 2,
'Bangladesh': 2,
'Guatemala': 2,
'Nepal': 2,
'Iraq': 2,
'Unknown': 1,
'Ghana': 1,
'Armenia': 1,
'Mongolia': 1,
'Vietnam': 1,
'Kuwait': 1,
'Bahamas': 1,
'SriLanka': 1,
'Latvia': 1,
'Liechtenstein': 1,
'Albania': 1,
'Nicaragua': 1,
'DominicanRepublic': 1,
'Samoa': 1,
'Bermuda': 1,
'Ecuador': 1,
'Georgia': 1,
'Botswana': 1,
'VaticanCity': 1,
'Angola': 1,
'Jamaica': 1,
'Kazakhstan': 1,
'Malawi': 1,
'Slovakia': 1,
'Lithuania': 1,
'Afghanistan': 1,
'Paraguay': 1,
'Somalia': 1,
'Sudan': 1,
'Panama': 1,
'Uganda': 1,
'EastGermany': 1,
'Ukraine': 1,
'Montenegro': 1}
Top 10 Movie Production Countries¶
In [24]:
plt.figure(figsize=(8,8))
ax = sns.barplot(x=list(countries_fin.keys())[0:10], y=list(countries_fin.values())[0:10])
ax.xaxis.set_ticks(list(countries_fin.keys())[0:10])
ax.set_xticklabels(list(countries_fin.keys())[0:10], rotation = 90)
ax.set_title('Top 10 Movie Production Countries', fontsize=20)
#color = ['lightblue', 'lightgrey']
Out[24]:
Text(0.5, 1.0, 'Top 10 Movie Production Countries')
Duration of movie¶
In [25]:
netflix_movies['duration']
Out[25]:
1 93 min
2 78 min
3 80 min
4 123 min
6 95 min
...
7781 88 min
7782 99 min
7783 111 min
7784 44 min
7786 90 min
Name: duration, Length: 5377, dtype: object
In [26]:
netflix_movies.loc[netflix_movies.index,['duration']] = netflix_movies['duration'].map(
lambda x: int(x.split("min")[0]))
netflix_movies['duration']
Out[26]:
1 93
2 78
3 80
4 123
6 95
...
7781 88
7782 99
7783 111
7784 44
7786 90
Name: duration, Length: 5377, dtype: object
In [27]:
sns.set(style="darkgrid")
sns.kdeplot(data=netflix_movies['duration'], fill=True)
Out[27]:
<Axes: xlabel='duration', ylabel='Density'>
In [ ]:
In [28]:
from collections import Counter
genres=list(netflix_movies['listed_in'])
gen=[]
for i in genres:
i=list(i.split(','))
for j in i:
gen.append(j.replace(' ',""))
g=Counter(gen)
g={k: v for k, v in sorted(g.items(), key=lambda item: item[1], reverse= True)}
fig, ax = plt.subplots(figsize=(15,8))
fig = plt.figure(figsize = (10, 10))
x=list(g.keys())
y=list(g.values())
ax.vlines(x, ymin=0, ymax=y, color='green')
ax.plot(x,y, "o", color='maroon')
ax.xaxis.set_ticks(list(g.keys()))
ax.set_xticklabels(x, rotation=45, ha='right')
ax.set_ylabel("Count of movies")
# set a title
ax.set_title("Genres")
Out[28]:
Text(0.5, 1.0, 'Genres')
<Figure size 1000x1000 with 0 Axes>
Analysis of TV SERIES on Netflix¶
In [29]:
countries1={}
netflix_shows.loc[netflix_shows.index,['country']]=netflix_shows['country'].fillna('Unknown')
cou1=list(netflix_shows['country'])
for i in cou1:
#print(i)
i=list(i.split(','))
if len(i)==1:
if i in list(countries1.keys()):
countries1[i]+=1
else:
countries1[i[0]]=1
else:
for j in i:
if j in list(countries1.keys()):
countries1[j]+=1
else:
countries1[j]=1
In [30]:
countries_fin1={}
for country,no in countries1.items():
country=country.replace(' ','')
if country in list(countries_fin1.keys()):
countries_fin1[country]+=no
else:
countries_fin1[country]=no
countries_fin1={k: v for k, v in sorted(countries_fin1.items(), key=lambda item: item[1], reverse= True)}
In [31]:
plt.figure(figsize=(15,15))
plt.title("Content creating countries")
sns.barplot(y=list(countries_fin1.keys()), x=list(countries_fin1.values()))
plt.ylabel("Arrival delay (in minutes)")
Out[31]:
Text(0, 0.5, 'Arrival delay (in minutes)')
TV shows with largest number of seasons¶
In [32]:
features=['title','duration']
durations = netflix_shows[features]
durations.loc[durations.index,['no_of_seasons']]=durations['duration'].str.replace(' Season','')
durations.loc[durations.index,['no_of_seasons']]=durations['no_of_seasons'].str.replace('s','')
durations.loc[durations.index,['no_of_seasons']]=durations['no_of_seasons'].astype(str).astype(int)
In [33]:
t=['title','no_of_seasons']
top=durations[t]
top=top.sort_values(by='no_of_seasons', ascending=False)
top20=top[0:20]
top20.plot(kind='bar',x='title',y='no_of_seasons', color='blue',figsize=(15,10))
Out[33]:
<Axes: xlabel='title'>
Lowest number of seasons¶
In [34]:
bottom=top.sort_values(by='no_of_seasons')
bottom=bottom[20:50]
In [35]:
bottom
Out[35]:
| title | no_of_seasons | |
|---|---|---|
| 5101 | Rapture | 1 |
| 5186 | Revolting Rhymes | 1 |
| 3340 | Kevin Hart: Don’t F**k This Up | 1 |
| 3386 | Killer Inside: The Mind of Aaron Hernandez | 1 |
| 3379 | Kill la Kill | 1 |
| 1882 | Drug Squad: Costa del Sol | 1 |
| 3370 | Kid-E-Cats | 1 |
| 3368 | Kicko & Super Speedo | 1 |
| 1883 | Drugs, Inc. | 1 |
| 3360 | Khotey Sikkey | 1 |
| 3355 | Khelti Hai Zindagi Aankh Micholi | 1 |
| 3354 | Khan: No. 1 Crime Hunter | 1 |
| 3352 | Khaani | 1 |
| 1890 | Dueños del paraíso | 1 |
| 3472 | Kuroko's Basketball | 1 |
| 3463 | Kulipari: Dream Walker | 1 |
| 3462 | Kulipari: An Army of Frogs | 1 |
| 3454 | Krishna Balram | 1 |
| 3126 | Japanese Style Originator | 1 |
| 3125 | Japan Sinks: 2020 | 1 |
| 1947 | El Cartel 2 | 1 |
| 3119 | Jamtara - Sabka Number Ayega | 1 |
| 3118 | James Acaster: Repertoire | 1 |
| 3113 | Jailbirds | 1 |
| 1949 | El Chavo | 1 |
| 3098 | Jack Taylor | 1 |
| 3090 | J-Style Trip | 1 |
| 3088 | Izzy's Koala World | 1 |
| 3083 | Itaewon Class | 1 |
| 3147 | Jenni Rivera: Mariposa de Barrio | 1 |
Content in Hong Kong¶
In [36]:
netflix_hk = netflix_overall[netflix_overall['country']=='Hong Kong']
nfhk = netflix_hk.dropna()
fig = px.treemap(nfhk, path=['country','director'],
color='director', hover_data=['director','title'],
color_continuous_scale='Purples')
fig.show()
In [37]:
newest_HK_series = netflix_hk.sort_values(by='release_year', ascending=False)[0:20]
newest_HK_series
Out[37]:
| show_id | type | title | director | cast | country | date_added | release_year | rating | duration | listed_in | description | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 187 | s188 | Movie | A Home with A View | Herman Yau | Francis Chun-Yu Ng, Louis Koo, Anita Yuen, Tat... | Hong Kong | April 30, 2019 | 2019 | TV-MA | 92 min | Comedies, International Movies | When a neighbor blocks their view of the city ... |
| 5528 | s5529 | TV Show | Sexy Central | NaN | Jeana Ho Pui-yu, Joyce Cheng, Ava Liu, Shiga L... | Hong Kong | July 20, 2019 | 2019 | TV-MA | 1 Season | International TV Shows, Romantic TV Shows, TV ... | In the bustling center of Hong Kong, five youn... |
| 7497 | s7498 | Movie | We Are Legends | Daniel Yee Heng Chan | Lam Yiu-sing, Ma Chi Wai, Wiyona Yeung, Eric K... | Hong Kong | June 1, 2019 | 2019 | TV-14 | 109 min | Action & Adventure, International Movies, Spor... | Raised in a boxing gym, two orphaned brothers ... |
| 2797 | s2798 | TV Show | Hong Kong West Side Stories | NaN | Louis Cheung, Myolie Wu, Justin Cheung, Brian ... | Hong Kong | April 30, 2019 | 2018 | TV-MA | 1 Season | International TV Shows, TV Comedies, TV Dramas | The intimate lives of young men and women from... |
| 4566 | s4567 | TV Show | OCTB | NaN | Jordan Chan, Justin Cheung, Kwok-Kwan Chan, Sa... | Hong Kong | February 5, 2018 | 2017 | TV-14 | 1 Season | Crime TV Shows, International TV Shows, TV Dramas | An undercover detective crosses paths with fam... |
| 3513 | s3514 | Movie | Lady Bloodfight | Chris Nahon | Amy Johnston, Muriel Hofmann, Jenny Wu, Kathy ... | Hong Kong | August 5, 2017 | 2016 | R | 101 min | Action & Adventure | An American travels to Hong Kong in hopes of w... |
| 3841 | s3842 | Movie | Mad World | Chun Wong | Shawn Yue, Eric Tsang, Elaine Jin, Charmaine Fong | Hong Kong | September 20, 2018 | 2016 | TV-MA | 102 min | Dramas, International Movies | A stockbroker struggling with bipolar disorder... |
| 1876 | s1877 | Movie | Drink Drank Drunk | Yeung Yat-Tak | Carlos Chan, Ken Hung, Deep Ng, Michelle Wai, ... | Hong Kong | August 24, 2019 | 2016 | TV-MA | 92 min | Comedies, International Movies | Too hungover to report as a witness in a crimi... |
| 7521 | s7522 | Movie | Weeds on Fire | Chi Fat Chan | Liu Kai Chi, Lam Yiu-sing, Tony Tsz-Tung Wu, P... | Hong Kong | September 27, 2018 | 2016 | TV-MA | 95 min | Dramas, Independent Movies, International Movies | In 1980s Hong Kong, a school principal forms a... |
| 6021 | s6022 | Movie | Ten Years | Jevons Au, Zune Kwok, Chow Kwun-wai, Ng Ka-Leu... | Wong Jing, Lau Ho-Chi, Leung Kin-Ping | Hong Kong | February 12, 2019 | 2015 | TV-MA | 102 min | Dramas, Independent Movies, International Movies | Five shorts reveal a fictional Hong Kong in 20... |
| 1087 | s1088 | Movie | Break Up 100 | Lawrence Cheng | Ekin Cheng, Chrissie Chow, Ivana Wong, Jase Ho... | Hong Kong | December 1, 2018 | 2014 | TV-14 | 105 min | Comedies, International Movies, Romantic Movies | After their 99th breakup, a career woman and h... |
| 3996 | s3997 | Movie | May We Chat | Philip Yung | Irene Wan, Peter Mak, Rainky Wai, Heidi Lee, K... | Hong Kong | August 26, 2018 | 2014 | TV-MA | 99 min | Dramas, International Movies | A messaging app unites a mute prostitute, an u... |
| 6663 | s6664 | Movie | The Midas Touch | Chi Keung Fung | Chapman To, Charlene Choi, Gao Yunxiang, Shati... | Hong Kong | July 21, 2019 | 2013 | TV-14 | 98 min | Comedies, International Movies | A debt collector takes over the management of ... |
| 5445 | s5446 | Movie | SDU: Sex Duties Unit | Gary Mak | Chapman To, Shawn Yue, Matt Chow, Kwok Cheung ... | Hong Kong | December 1, 2018 | 2013 | TV-MA | 96 min | Comedies, International Movies | Four man-children in an elite tactical unit ga... |
| 1816 | s1817 | Movie | Don't Go Breaking My Heart | Johnnie To | Louis Koo, Gao Yuanyuan, Daniel Wu | Hong Kong | December 1, 2018 | 2011 | TV-PG | 115 min | Comedies, International Movies, Romantic Movies | A financial analyst succumbs to a love triangl... |
| 3757 | s3758 | Movie | Love In A Puff | Pang Ho-cheung | Miriam Chin Wah Yeung, Shawn Yue, Singh Hartih... | Hong Kong | August 1, 2018 | 2010 | TV-MA | 103 min | Comedies, Dramas, International Movies | When the Hong Kong government enacts a ban on ... |
| 4620 | s4621 | Movie | Once a Gangster | Felix Chong | Ekin Cheng, Jordan Chan, Alex Fong, Michelle Y... | Hong Kong | December 1, 2018 | 2010 | TV-MA | 95 min | Action & Adventure, Comedies, International Mo... | Two former triads are tapped to run in an elec... |
| 3716 | s3717 | Movie | Look for a Star | Andrew Lau Wai-Keung | Andy Lau, Qi Shu, Zhang Hanyu, Denise Ho, Domi... | Hong Kong | December 1, 2018 | 2009 | TV-14 | 117 min | Comedies, International Movies, Romantic Movies | While keeping his identity secret, a real esta... |
| 423 | s424 | Movie | All's Well, End's Well (2009) | Vincent Kok | Louis Koo, Sandra Ng Kwan Yue, Raymond Wong, R... | Hong Kong | November 9, 2018 | 2009 | TV-14 | 99 min | Comedies, International Movies, Romantic Movies | Bound by a family rule that forbids him from m... |
| 293 | s294 | Movie | Accident | Cheang Pou Soi | Louis Koo, Richie Ren, Stanley Fung Sui-Fan, M... | Hong Kong | December 1, 2018 | 2009 | TV-MA | 87 min | International Movies, Thrillers | A contract killer skilled at staging lethal ac... |
Latest release¶
In [38]:
fig = go.Figure(data=[go.Table(header=dict(values=['Title', 'Release Year']),
cells=dict(values=[newest_HK_series['title'],newest_HK_series['release_year']]))
])
fig.show()
In [ ]: